package edu.localisationPhone;

import java.util.ArrayList;

import android.graphics.drawable.Drawable;

import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class ElementOverlay extends ItemizedOverlay {
	
	private ArrayList<OverlayItem> tabOverlay = new ArrayList<OverlayItem>();

	public ElementOverlay(Drawable defaultMarker) {
		super(boundCenterBottom(defaultMarker));
	}
	
	public void ajouterOverlay(OverlayItem overlay) {
	    this.tabOverlay.add(overlay);
	    populate();
	}

	@Override
	protected OverlayItem createItem(int i) {
		return this.tabOverlay.get(i);
	}

	@Override
	public int size() {
		return this.tabOverlay.size();
	}

}
